// Copyright (c) 2025 coze-dev Authors
// SPDX-License-Identifier: Apache-2.0
/* stylelint-disable selector-class-pattern */
/* stylelint-disable no-descending-specificity */
/* stylelint-disable font-family-no-missing-generic-family-keyword */
/* stylelint-disable declaration-no-important */
@black: #000000;
@white: #FFFFFF;

@text-gray-0: #1D1C23;
@text-gray-1: #1D1C23CC;
@text-gray-2: #1D1C2399;
@text-gray-3: #1D1C2359;
@icon-color: #6B6B75;
@border-color: #1D1C2314;
@text-blue-0: #0064fa;


.copy-icon {
  display:flex;
  align-items: center;
  justify-content: center;

  width: 14px;
  height: 14px;

  color: var(--coz-fg-secondary);
}


.full-screen-height{
  max-height: calc(100vh - 320px);
}

.view-content {
  overflow: auto;

  max-height: 440px;
  padding: 8px 12px;

  font-family: Menlo;
  font-size: 12px;

  border: 1px solid @border-color;
  border-radius: 8px;

  &.io-error {
    border: 1px solid #FF441E;
  }
}

.segment-tab {
  :global {
    .semi-radio-addon-buttonRadio-checked {
      color: rgb(var(--coze-up-brand-9)) !important;
    }
  }
}

.raw-container{
  overflow: auto;

  max-height: 320px;
  padding: 0;

  font-family: Menlo;
  font-size: 12px;

  border: 1px solid @border-color;
  border-top: none;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;

  &.io-error {
    border: 1px solid #FF441E;
  }

  &:not(:last-child) {
    margin-bottom: 16px;
  }
}


.raw-content{
  padding: 8px 12px;
}

.panel-content{
  padding:6px 12px;

  :global{
    .semi-collapse-content{
      padding-right: 0;
      padding-left: 0;
    }

    .semi-collapse-header:hover{
      background-color: transparent;
    }
  }
}

.tag-content{
  display: flex;
  gap: 4px;

  width: fit-content;
  margin-top: 8px;
  padding: 4px;

  font-size: 12px;

  background: var(--semi-color-info-light-default);
  border-radius: 6px;
}

.raw-title{
  position: sticky;
  z-index: 2;
  top: 0;

  padding: 8px 12px;

  font-family: JetBrainsMonoBold !important;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--coz-fg-secondary);

  background: var(--coz-bg-primary);
  // border-bottom: 1px solid @border-color;
  border: 1px solid @border-color;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;

}

.view-string {
  line-height: 16px;
  color: var(--coz-fg-primary);
  word-wrap: break-word;
  white-space: pre-line;

  &.empty {
    color: @text-gray-2;
  }
}

.function-container{
  margin-top: 8px;
  border: 1px solid @border-color;
  border-radius: 8px;

  .function-title{
    padding: 8px 12px;
    background-color: var(--semi-color-info-light-default);
    border-bottom:  1px solid @border-color;
  }
}

.function-collapse{
  border: 1px solid @border-color;
  border-radius: 8px;

  .function-panel-content{
    padding: 0;

    :global{
      .semi-collapse-content{
        padding: 8px 0 12px;
      }

      .semi-collapse-header{
        margin: 0;
        padding: 6px 12px;
      }

      .semi-collapse-header:hover{
        background-color: transparent;
      }
    }

    &:last-child{
      border-bottom: 0;
    }
  }
}



.query-content-first {
  margin-top: 8px;
}

.query-content-item {
  margin-bottom: 8px;
  padding: 0 12px;

  .query-file-name {
    text-decoration: none;

    &:hover {
      .query-file-tag {
        color: @text-blue-0;
        border-color: @text-blue-0;
      }
    }
  }
}

.query-file-tag {
  text-decoration: none;

  &:hover {
    .query-file-tag {
      color: @text-blue-0;
      border-color: @text-blue-0;
    }
  }
}

.tool-title, .content-split-line {
  display: flex;
  gap: 4px;
  align-items: center;

  padding-bottom: 6px;

  border-bottom: 1px solid #1D1C2314;
}


.last-content-item {
  padding-bottom: 0;
  border-bottom: none;
}

.argu-container{
  overflow: auto;

  max-height: 340px;


  font-family: Menlo;
  font-size: 12px;

  border: 1px solid @border-color;
  border-radius: 8px;

  &.io-error {
    border: 1px solid #FF441E;
  }

  &:not(:last-child) {
    margin-bottom: 20px;
  }
}

.argu-item-container{
  padding: 8px 12px;

  &:not(:last-child){
    border-bottom: 1px solid #1D1C2314;
  }
}

.argu-item{
  display: flex;
  gap: 4px;
  align-items: center;
}

.encryption-wrapper {
  padding: 0 2px;
  font-size: 12px;
  border: 1px solid rgb(227, 39, 39);
  border-radius: 4px;

  .encryption-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: rgb(227, 39, 39);
  }

  .encryption-split {
    width: 1px;
    height: 12px;
    background-color: rgb(227, 39, 39);
  }

  .encryption-link {
    display: flex;
    align-items: center;
    font-size: 12px;
  }
}


